package com.compass.thread;

import com.compass.service.CallService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Worker implements Runnable{
    private static final Logger LOGGER = LoggerFactory.getLogger(Worker.class);

    private CallService callService;
    private String itemName;
    private int num;
    public Worker(CallService callService,String itemName,int num){
        this.callService = callService;
        this.itemName = itemName;
        this.num = num;
    }

    @Override
    public void run() {
        String info = callService.sell(itemName, num);
        LOGGER.debug(info);
    }
}
